#include "Screen.hpp"

Screen::Screen() {

}

Screen &Screen::getInstance() {
	static Screen *instance;

	if (!instance) {
		instance = new Screen();
	}

	return *instance;
}

void Screen::off() {
	system("/opt/vc/bin/tvservice -o");
}

void Screen::on() {

	system("chmod u+s /opt/vc/bin/tvservice");
	system("chmod u+s /bin/chvt");
	system("/opt/vc/bin/tvservice -p && chvt 1 && chvt 7");
}
